-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rubocop configuration update #21
base: master
Are you sure you want to change the base?
Conversation
config/rubocop.yml
Outdated
Metrics/LineLength: | ||
Max: 120 | ||
Layout/LineLength: | ||
Max: 130 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
120 was a good value, why change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That change was introduced by me because in one of our Ragnarson-generic recipes line length was bigger then 120, but I didn't thought about breaking lines to make it fit rubocop requirements.
Im going to revert that change, back to 120.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@michalgoldys 120 column length rule is an industry-standard and we'd like to comply with it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can find more info in the cop description - https://rubystyle.guide/#max-line-length
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stuszynski Yeah, you're right. I've already made a change to that file ;) I won't mess with it again. Sorry for hearth attack :)
@@ -7,10 +7,11 @@ AllCops: | |||
- bin/** | |||
- vendor/bundle/**/* | |||
- node_modules/**/* | |||
NewCops: disable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because new crops can affect style of our code in way that we don't want, and due to that I wasn't sure if it will be right approach.
I can enable all of new cops, and check how they will affect our code. Or just, enable it. Please let me know what you think.
ragnarson-stylecheck.gemspec
Outdated
s.email = "[email protected]" | ||
s.files = Dir["{config,lib}/**/*", "MIT-LICENSE", "README.md", "./"] | ||
s.homepage = "https://github.com/ragnarson/ragnarson-stylecheck" | ||
s.license = "MIT" | ||
|
||
s.add_development_dependency "bundler", "~> 1.10" | ||
s.add_dependency "rake", ">= 10.0" | ||
s.add_dependency "rubocop", "~> 0.64" | ||
s.add_dependency "rubocop", "~> 0.93.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not the latest stable release? 1.18.3? Are there too many breaking changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have bumped rubocop version to meet requirements of Cookstyle gem that we will be migrating to due to deprecation of Foodcritic.
But you're right, I've already bumped rubocop version to latest one, and pushed changes.
We could use higher version of Cookstyle.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One of The Good Scout rules says that if you're about to bump any version of any dependency (chef, gem, or whatever) you should always aim for the latest stable version available. Unless you see any potential problems (e.g. with API incompatibility, refactor) that you don't have time to deal with.
If you can't do it. A good next action would be to leave a comment about those potential issues in the code. Ideally, if you can't upgrade to the latest stable release, you should create a task ticket for doing it - and describe all the findings you already gather.
@grk @stuszynski @pdomagala |
Update configuration of rubocop.yml
Update project version and dependencies
Re-generate Gemfile.lock that contains new versions of gems
Update line-length value